<?php if (!defined('THINK_PATH')) exit();?><dl class="pop-area">
  <dt class="mb10" style="overflow:hidden;*zoom:1;"><div class="l">认证类型：</div>
    <div class="r"><select name="pid" id="pid">
        <?php if(is_array($vType)): ?><?php $i = 0;?><?php $__LIST__ = $vType?><?php if( count($__LIST__)==0 ) : echo "" ; ?><?php else: ?><?php foreach($__LIST__ as $key=>$vo): ?><?php ++$i;?><?php $mod = ($i % 2 )?><option value="<?php echo ($vo["user_group_id"]); ?>" <?php if($cateInfo['pid']==$vo['user_group_id']){ ?>selected<?php } ?>><?php echo ($vo["user_group_name"]); ?></option><?php endforeach; ?><?php endif; ?><?php else: echo "" ;?><?php endif; ?>
    </select></div>
  </dt>
  <dt style="overflow:hidden;*zoom:1;"><div class="l">名称：</div><div class="r"><input type="text" id="title" value="<?php echo ($cateInfo['title']); ?>" class="s-txt" style="width:245px"></div></dt>
  <dd style="text-align:center;margin:15px 0 0 ">
        <?php if (isset($cateInfo)) { ?>
        <input type="button" class="btn_b" onclick="editVerifyCategory()" value="确定" />
        <?php }else { ?>
        <input type="button" class="btn_b" onclick="addVerifyCategory()" value="确定" />
        <?php } ?>
        <input type="button" class="btn_w ml10" onclick="cancel()" value="取消" />
  </dd>
  <div class="clear"></div>
</dl>

<script type="text/javascript">
// 添加身份
function addVerifyCategory() {
	var title = $.trim($('#title').val());
	var pid   = $('#pid').val();
	if(title == '') {
		ui.error('请输入名称');
		return false;
	}
	// 提交修改
	$.post("<?php echo U('admin/User/doAddVerifyCategory');?>", {title:title, pid:pid}, function(msg){
        admin.ajaxReload(msg);
	},'json');
};
// 编辑地区
function editVerifyCategory() {
	var title = $.trim($('#title').val());
  var pid   = $('#pid').val();
	var user_verified_category_id = "<?php echo ($cateInfo['user_verified_category_id']); ?>";
	
	if(title == '') {
        ui.error('请输入名称');
        return false;
    }
	$.post("<?php echo U('admin/User/doEditVerifyCategory');?>", {user_verified_category_id:user_verified_category_id, title:title, pid:pid}, function(msg){
		  admin.ajaxReload(msg);
	},'json');
}
// 关闭弹窗
function cancel() {
	ui.box.close();
}
</script>